<form [formGroup]="form"  class="great-form" (ngSubmit)="submitForm()">
  <div class="great-form-group">
    <label>中文校验:</label>
    <div class="great-input">
      <input type="text"  class="input" formControlName="chinese"><span [innerHtml]="'this.validator.chinese({maxLength:10})'"></span>
      <div class="great-form-error-text" *ngIf="form.get('chinese').dirty && form.get('chinese').errors">最多10个字数！</div>
    </div>
  </div>
  <div class="great-form-group">
    <label>必须10个字母数字组合:</label>
    <div class="great-input">
      <input type="text"  class="input" formControlName="alphanumeric"><span [innerHtml]="'this.validator.alphanumeric({length:10})'"></span>
      <div class="great-form-error-text" *ngIf="form.get('alphanumeric').dirty && form.get('alphanumeric').errors">必须10个字数！</div>
    </div>
  </div>
  <div class="great-form-group">
    <label>身份证号:</label>
    <div class="great-input">
      <input type="text"  class="input" formControlName="identityCard"><span [innerHtml]="'this.validator.identityCard()'"></span>
      <div class="great-form-error-text" *ngIf="form.get('identityCard').dirty && form.get('identityCard').errors">身份证格式有误！</div>
    </div>
  </div>
  <div class="great-form-group">
    <label>邮箱:</label>
    <div class="great-input">
      <input type="text"  class="input" formControlName="email"><span [innerHtml]="'this.validator.email()'"></span>
      <div class="great-form-error-text" *ngIf="form.get('email').dirty && form.get('email').errors">邮箱格式有误！  </div>
    </div>
  </div>
  <div class="great-form-group">
    <div class="great-form-bottom">
      <button type="submit">保 存</button>
    </div>
  </div>
</form>
<h2>未完待续……</h2>
